<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>flex+margin</title>
    <style>
        #box{
            position: relative;
            width: 200px;
            height: 200px;
            background-color: cyan;
        }

        #item{
            position: absolute;
            right: 0;
            top: 0;
            width: 100px;
            height: 100px;
            background-color: pink;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
        }
        .word{
            height: 50px;
            width: 50px;
            background-color: #fff;
        }
    </style>
</head>
<body>
<div id="box">
    <div id="item">
        <div class="word">这是最里面的内容</div>
    </div>
</div>
</body>
</html>
